Joel H. Nitta
Reprohack
2022-10-11
https://joelnitta.github.io/reprohack_2022-10-11
Project Research Associate @ Tokyo University
Research interests: Ecology and evolution of ferns
Hobbies: Running (after my 7YO!)
Introduction to {targets} and Docker
Demo: Pleurosoriopsis project
Q & A
The ability for others (or your future self) to re-run your code and get the same results
Which steps need to be run in what order?
If one part of a workflow changes, how does it affect other parts?
How much of it do we need to re-run?
R package to automate workflow
Only runs necessary steps
Can run workflow steps in parallel (speeds up analysis)
Provides proof that results are derived from code
Package website https://docs.ropensci.org/targets/
User manual https://books.ropensci.org/targets/
Targetopia https://wlandau.github.io/targetopia/
{tarchetypes} website https://docs.ropensci.org/tarchetypes/
Discussion board https://github.com/ropensci/targets/discussions
Docker provides containers: self-contained packages of software with everything needed to run an application
A given piece of software depends on many other pieces of software (dependencies)
If dependencies change (or are missing), your program may not run
Docker containers provide all dependencies needed, on any computer
Docker docs https://docs.docker.com/
Docker hub https://hub.docker.com/
Software Carpentry lesson https://carpentries-incubator.github.io/docker-introduction/
Rocker Project (Docker for R) https://rocker-project.org/
Study on growth conditions of fern Pleurosoriopsis makinoi in Japan
Original reprohack used {drake} instead of {targets} but {targets} is newer and replaces {drake}, so I recommend that
Available at targets branch of pleurosoriopsis repo:
(must be run from within pleurosoriopsis folder)
docker run --rm -dt -v ${PWD}:/home/rstudio/pleurosoriopsis -p 8787:8787 \
--name pleuro \
-e DISABLE_AUTH=true \
joelnitta/pleurosoriopsis:targetslocalhost:8787/ in your browserpleurosoriopsis folderPleurosoriopsis.Rproj to open the project.docker kill pleuro
docker rmi joelnitta/pleurosoriopsis:targets